package com.charlie.sessions;

import com.charlie.beans.Users;
import com.charlie.sessions.Cart.CartItem;
import java.util.Set;
import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
import javax.ejb.Local;

/**
 *
 * @author Vitaliy Mostipaka <imprtat@gmail.com>
 */
@Local
public interface CartLocal {

    Set<CartItem> getItems();

    int getItemsAmount();
    
    CartItem findItemById(int itemId);

    void addItem(int itemId, int amount);
    
    void setItemAmount(int itemId, int amount);

    void removeItem(int itemId);
    
    public void clear();

    int getCost();

    @PostConstruct
    public void init();

    @PreDestroy
    public void destroy();

    void setUser(Users user);

    String getEmail();

    String getLocation();

    void setEmail(String email);

    void setLocation(String location);

    void setWarehouse(int warehouseId);

    int getWarehouse();

    boolean getNotify();

    void setNotify(boolean notify);
}
